Integrand size = 28, antiderivative size = 174 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=\frac {\left (c^3+3 i c^2 d-3 c d^2+3 i d^3\right ) x}{4 a^2 (c-i d) (c+i d)^3}-\frac {d^3 \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c-i d) (c+i d)^3 f}+\frac {i c-3 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2} \]
[Out]
Time = 0.48 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3640, 3677, 3612, 3611} \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=\frac {x \left (c^3+3 i c^2 d-3 c d^2+3 i d^3\right )}{4 a^2 (c-i d) (c+i d)^3}-\frac {d^3 \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 f (c-i d) (c+i d)^3}+\frac {-3 d+i c}{4 a^2 f (c+i d)^2 (1+i \tan (e+f x))}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2} \]
[In]
[Out]
Rule 3611
Rule 3612
Rule 3640
Rule 3677
Rubi steps \begin{align*} \text {integral}& = -\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2}-\frac {\int \frac {-2 a (i c-2 d)-2 i a d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))} \, dx}{4 a^2 (i c-d)} \\ & = \frac {i c-3 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2}-\frac {\int \frac {-2 a^2 \left (c^2+3 i c d-4 d^2\right )-2 a^2 (c+3 i d) d \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{8 a^4 (c+i d)^2} \\ & = \frac {\left (c^3+3 i c^2 d-3 c d^2+3 i d^3\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )}+\frac {i c-3 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2}-\frac {d^3 \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^2 (c+i d)^2 \left (c^2+d^2\right )} \\ & = \frac {\left (c^3+3 i c^2 d-3 c d^2+3 i d^3\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )}-\frac {d^3 \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c+i d)^2 \left (c^2+d^2\right ) f}+\frac {i c-3 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x))}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2} \\ \end{align*}
Time = 1.19 (sec) , antiderivative size = 160, normalized size of antiderivative = 0.92 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=-\frac {\frac {i \left (c^2+4 i c d-7 d^2\right ) \log (i-\tan (e+f x))}{c+i d}+\frac {(c+i d)^2 \log (i+\tan (e+f x))}{i c+d}+\frac {8 d^3 \log (c+d \tan (e+f x))}{c^2+d^2}+\frac {2 i (c+i d)}{(-i+\tan (e+f x))^2}-\frac {2 (c+3 i d)}{-i+\tan (e+f x)}}{8 a^2 (c+i d)^2 f} \]
[In]
[Out]
Time = 0.57 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.35
method | result | size |
risch | \(-\frac {x}{4 a^{2} \left (i d -c \right )}-\frac {{\mathrm e}^{-2 i \left (f x +e \right )} d}{2 a^{2} \left (i d +c \right )^{2} f}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} c}{4 a^{2} \left (i d +c \right )^{2} f}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )}}{16 a^{2} \left (i d +c \right ) f}+\frac {2 i d^{3} x}{a^{2} \left (2 i c^{3} d +2 i c \,d^{3}+c^{4}-d^{4}\right )}+\frac {2 i d^{3} e}{a^{2} f \left (2 i c^{3} d +2 i c \,d^{3}+c^{4}-d^{4}\right )}-\frac {d^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{a^{2} f \left (2 i c^{3} d +2 i c \,d^{3}+c^{4}-d^{4}\right )}\) | \(235\) |
norman | \(\frac {\frac {-i c +2 d}{2 a f \left (-2 i c d -c^{2}+d^{2}\right )}+\frac {\left (3 i d +c \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{4 a f \left (2 i c d +c^{2}-d^{2}\right )}+\frac {\left (5 i d +3 c \right ) \tan \left (f x +e \right )}{4 a f \left (2 i c d +c^{2}-d^{2}\right )}+\frac {\left (3 i c^{2} d +3 i d^{3}+c^{3}-3 c \,d^{2}\right ) x}{4 \left (c^{2}+d^{2}\right ) a \left (2 i c d +c^{2}-d^{2}\right )}-\frac {d \left (\tan ^{2}\left (f x +e \right )\right )}{2 a f \left (2 i c d +c^{2}-d^{2}\right )}+\frac {\left (3 i c^{2} d +3 i d^{3}+c^{3}-3 c \,d^{2}\right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{2 \left (c^{2}+d^{2}\right ) a \left (2 i c d +c^{2}-d^{2}\right )}+\frac {\left (3 i c^{2} d +3 i d^{3}+c^{3}-3 c \,d^{2}\right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{4 \left (c^{2}+d^{2}\right ) a \left (2 i c d +c^{2}-d^{2}\right )}}{a \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}+\frac {d^{3} \ln \left (c +d \tan \left (f x +e \right )\right )}{a^{2} f \left (-2 i c^{3} d -2 i c \,d^{3}-c^{4}+d^{4}\right )}-\frac {d^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 a^{2} f \left (-2 i c^{3} d -2 i c \,d^{3}-c^{4}+d^{4}\right )}\) | \(431\) |
derivativedivides | \(\frac {d^{3} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{2} \left (i d -c \right ) \left (i d +c \right )^{3}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \,a^{2} \left (8 i d -8 c \right )}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{f \,a^{2} \left (8 i d -8 c \right )}+\frac {i c d}{f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )}+\frac {c^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )}-\frac {3 d^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )}-\frac {i c^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {i d^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {c d}{2 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2}}{16 f \,a^{2} \left (i d +c \right )^{3}}+\frac {7 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{2}}{16 f \,a^{2} \left (i d +c \right )^{3}}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c d}{4 f \,a^{2} \left (i d +c \right )^{3}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c^{2}}{8 f \,a^{2} \left (i d +c \right )^{3}}-\frac {7 \arctan \left (\tan \left (f x +e \right )\right ) d^{2}}{8 f \,a^{2} \left (i d +c \right )^{3}}+\frac {i \arctan \left (\tan \left (f x +e \right )\right ) c d}{2 f \,a^{2} \left (i d +c \right )^{3}}\) | \(446\) |
default | \(\frac {d^{3} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{2} \left (i d -c \right ) \left (i d +c \right )^{3}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \,a^{2} \left (8 i d -8 c \right )}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{f \,a^{2} \left (8 i d -8 c \right )}+\frac {i c d}{f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )}+\frac {c^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )}-\frac {3 d^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )}-\frac {i c^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {i d^{2}}{4 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {c d}{2 f \,a^{2} \left (i d +c \right )^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2}}{16 f \,a^{2} \left (i d +c \right )^{3}}+\frac {7 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{2}}{16 f \,a^{2} \left (i d +c \right )^{3}}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c d}{4 f \,a^{2} \left (i d +c \right )^{3}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c^{2}}{8 f \,a^{2} \left (i d +c \right )^{3}}-\frac {7 \arctan \left (\tan \left (f x +e \right )\right ) d^{2}}{8 f \,a^{2} \left (i d +c \right )^{3}}+\frac {i \arctan \left (\tan \left (f x +e \right )\right ) c d}{2 f \,a^{2} \left (i d +c \right )^{3}}\) | \(446\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.05 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=-\frac {{\left (16 \, d^{3} e^{\left (4 i \, f x + 4 i \, e\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right ) - 4 \, {\left (c^{3} + 3 i \, c^{2} d - 3 \, c d^{2} + 7 i \, d^{3}\right )} f x e^{\left (4 i \, f x + 4 i \, e\right )} - i \, c^{3} + c^{2} d - i \, c d^{2} + d^{3} - 4 \, {\left (i \, c^{3} - 2 \, c^{2} d + i \, c d^{2} - 2 \, d^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{16 \, {\left (a^{2} c^{4} + 2 i \, a^{2} c^{3} d + 2 i \, a^{2} c d^{3} - a^{2} d^{4}\right )} f} \]
[In]
[Out]
Time = 5.11 (sec) , antiderivative size = 610, normalized size of antiderivative = 3.51 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=\frac {x \left (c^{2} + 4 i c d - 7 d^{2}\right )}{4 a^{2} c^{3} + 12 i a^{2} c^{2} d - 12 a^{2} c d^{2} - 4 i a^{2} d^{3}} + \begin {cases} \frac {\left (4 i a^{2} c^{2} f e^{2 i e} - 8 a^{2} c d f e^{2 i e} - 4 i a^{2} d^{2} f e^{2 i e}\right ) e^{- 4 i f x} + \left (16 i a^{2} c^{2} f e^{4 i e} - 48 a^{2} c d f e^{4 i e} - 32 i a^{2} d^{2} f e^{4 i e}\right ) e^{- 2 i f x}}{64 a^{4} c^{3} f^{2} e^{6 i e} + 192 i a^{4} c^{2} d f^{2} e^{6 i e} - 192 a^{4} c d^{2} f^{2} e^{6 i e} - 64 i a^{4} d^{3} f^{2} e^{6 i e}} & \text {for}\: 64 a^{4} c^{3} f^{2} e^{6 i e} + 192 i a^{4} c^{2} d f^{2} e^{6 i e} - 192 a^{4} c d^{2} f^{2} e^{6 i e} - 64 i a^{4} d^{3} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {c^{2} + 4 i c d - 7 d^{2}}{4 a^{2} c^{3} + 12 i a^{2} c^{2} d - 12 a^{2} c d^{2} - 4 i a^{2} d^{3}} + \frac {c^{2} e^{4 i e} + 2 c^{2} e^{2 i e} + c^{2} + 4 i c d e^{4 i e} + 6 i c d e^{2 i e} + 2 i c d - 7 d^{2} e^{4 i e} - 4 d^{2} e^{2 i e} - d^{2}}{4 a^{2} c^{3} e^{4 i e} + 12 i a^{2} c^{2} d e^{4 i e} - 12 a^{2} c d^{2} e^{4 i e} - 4 i a^{2} d^{3} e^{4 i e}}\right ) & \text {otherwise} \end {cases} - \frac {d^{3} \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{a^{2} f \left (c - i d\right ) \left (c + i d\right )^{3}} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
none
Time = 0.46 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.61 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=\frac {2 \, {\left (-\frac {i \, d^{4} \log \left (d \tan \left (f x + e\right ) + c\right )}{2 i \, a^{2} c^{4} d - 4 \, a^{2} c^{3} d^{2} - 4 \, a^{2} c d^{4} - 2 i \, a^{2} d^{5}} - \frac {{\left (c^{2} + 4 i \, c d - 7 \, d^{2}\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{-16 i \, a^{2} c^{3} + 48 \, a^{2} c^{2} d + 48 i \, a^{2} c d^{2} - 16 \, a^{2} d^{3}} + \frac {\log \left (\tan \left (f x + e\right ) + i\right )}{-16 i \, a^{2} c - 16 \, a^{2} d} + \frac {3 \, c^{2} \tan \left (f x + e\right )^{2} + 12 i \, c d \tan \left (f x + e\right )^{2} - 21 \, d^{2} \tan \left (f x + e\right )^{2} - 10 i \, c^{2} \tan \left (f x + e\right ) + 40 \, c d \tan \left (f x + e\right ) + 54 i \, d^{2} \tan \left (f x + e\right ) - 11 \, c^{2} - 36 i \, c d + 37 \, d^{2}}{-32 \, {\left (i \, a^{2} c^{3} - 3 \, a^{2} c^{2} d - 3 i \, a^{2} c d^{2} + a^{2} d^{3}\right )} {\left (\tan \left (f x + e\right ) - i\right )}^{2}}\right )}}{f} \]
[In]
[Out]
Time = 9.96 (sec) , antiderivative size = 1384, normalized size of antiderivative = 7.95 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx=\text {Too large to display} \]
[In]
[Out]